<template>
	<view class="content">		
		<test v-if="flag" :title="title" @myEven='getNum'></test>
		<button type="primary" @click="checkTest">切换组件</button>
		<test-a></test-a>
		<test-b></test-b>
	</view>
</template>

<script>
	import test from '../../components/test.vue'
	import testA from '../../components/a.vue'
	import testB from '../../components/b.vue'
	export default {
		data() {
			return {
				title: 'Hello',
				flag:true
			}
		},
		onLoad() {

		},
		methods: {
			checkTest(){
				this.flag=!this.flag
			},
			getNum(num){
				console.log(num)
			}
		},
		components:{
			test:test,
			"test-a":testA,
			"test-b":testB
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
